package com.yuchao.spi;

import com.yuchao.spi.service.IShout;

import java.util.ServiceLoader;

/**
 * https://mp.weixin.qq.com/s?__biz=Mzg3MTEyNDc2NA==&mid=100000623&idx=1&sn=a8c7b3b9ea5325b71bdb1600d1b9a5c2&chksm=4e82191c79f5900a67e7a24a319bcbba285e66446c03bcdb72b0bc53fed89bc028090f45d740&mpshare=1&scene=1&srcid=&sharer_sharetime=1575513067176&sharer_shareid=ffb29e017da1da1a197c5b1688899471&key=19d92502599169274a4c9ac0d8042ae799717cc1d6f677a6b7cf30850b0a50f65ec58dfe5ae4839adf7982efc11615f55add55f5e7ff00f785b2807e94b163a9f12d8d91c848a928618c06b1cb379637&ascene=1&uin=MTg1NDIzNDExMw%3D%3D&devicetype=Windows+10&version=62070158&lang=zh_CN&exportkey=AyMBHYzEs8IwDfi38%2FsXnsY%3D&pass_ticket=g7Rt9XV%2FqWQ%2FTPKO2AgxHGnc%2BPmyhyQv9ilXitf%2FmeyYxyKgHfiCwNsk8e9qb0sE
 */
public class SPIMain {

    public static void main(String[] args) {
        ServiceLoader<IShout> shouts = ServiceLoader.load(IShout.class);
        for (IShout s : shouts) {
            s.shout();
        }
    }
}
